//
//  PurpleView.m
//  Pthread
//
//  Created by Yanyan Jiang on 2023/2/9.
//  Copyright © 2023 Yanyan Jiang. All rights reserved.
//

#import "PurpleView.h"

@interface PurpleView ()

@property(nonatomic, weak) IBOutlet UIButton *blueBtn;

@end

@implementation PurpleView

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
    
   CGPoint bluePoint = [self convertPoint:point toView:self.blueBtn];
    if([self.blueBtn pointInside:bluePoint withEvent:event]){
        return self.blueBtn;
    }
    return [super hitTest:point withEvent:event];
    
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    NSLog(@"%@----touch",[self class]);
}

@end
